package com.ruoyi.business.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.HurtModelResultMapper;
import com.ruoyi.business.domain.HurtModelResult;
import com.ruoyi.business.service.IHurtModelResultService;

/**
 * 3D疼痛模型结果Service业务层处理
 *
 * @author ruoyi
 * @date 2024-04-20
 */
@Service
public class HurtModelResultServiceImpl implements IHurtModelResultService
{
    @Autowired
    private HurtModelResultMapper hurtModelResultMapper;

    /**
     * 查询3D疼痛模型结果
     *
     * @param id 3D疼痛模型结果主键
     * @return 3D疼痛模型结果
     */
    @Override
    public HurtModelResult selectHurtModelResultById(Long id)
    {
        return hurtModelResultMapper.selectHurtModelResultById(id);
    }

    /**
     * 查询3D疼痛模型结果列表
     *
     * @param hurtModelResult 3D疼痛模型结果
     * @return 3D疼痛模型结果
     */
    @Override
    public List<HurtModelResult> selectHurtModelResultList(HurtModelResult hurtModelResult)
    {
        return hurtModelResultMapper.selectHurtModelResultList(hurtModelResult);
    }

    /**
     * 新增3D疼痛模型结果
     *
     * @param hurtModelResult 3D疼痛模型结果
     * @return 结果
     */
    @Override
    public int insertHurtModelResult(HurtModelResult hurtModelResult)
    {
        hurtModelResult.setCreateTime(DateUtils.getNowDate());
        return hurtModelResultMapper.insertHurtModelResult(hurtModelResult);
    }

    /**
     * 修改3D疼痛模型结果
     *
     * @param hurtModelResult 3D疼痛模型结果
     * @return 结果
     */
    @Override
    public int updateHurtModelResult(HurtModelResult hurtModelResult)
    {
        return hurtModelResultMapper.updateHurtModelResult(hurtModelResult);
    }

    /**
     * 批量删除3D疼痛模型结果
     *
     * @param ids 需要删除的3D疼痛模型结果主键
     * @return 结果
     */
    @Override
    public int deleteHurtModelResultByIds(Long[] ids)
    {
        return hurtModelResultMapper.deleteHurtModelResultByIds(ids);
    }

    /**
     * 删除3D疼痛模型结果信息
     *
     * @param id 3D疼痛模型结果主键
     * @return 结果
     */
    @Override
    public int deleteHurtModelResultById(Long id)
    {
        return hurtModelResultMapper.deleteHurtModelResultById(id);
    }

    @Override
    public List<Map<String, Object>> getPatientModelResult(Long patientId) {
        return hurtModelResultMapper.getPatientModelResult(patientId);
    }

    @Override
    public Map<String, String> getPatientModelDetail(Long id) {
        return hurtModelResultMapper.getPatientModelDetail(id);
    }

    @Override
    public List<Map<String, Object>> getPatientModelList(Long patientId) {
        return hurtModelResultMapper.getPatientModelList(patientId);
    }
}
